//
//  UITextField+cate.m
//  Riji
//
//  Created by  on 2022/8/18.
//

#import "UITextField+cate.h"

@implementation UITextField (cate)
- (void)setPlaceholderHexColor:(NSString *)placeholderHexColor{
    objc_setAssociatedObject(self,@selector(placeholderHexColor),placeholderHexColor,OBJC_ASSOCIATION_COPY_NONATOMIC);
    self.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.placeholder attributes:@{NSForegroundColorAttributeName:[UIColor colorHex:placeholderHexColor]}];
    
}
-(NSString *)placeholderHexColor{
    return objc_getAssociatedObject(self, @selector(placeholderHexColor));
}
@end
